package conchmusic.conchmusicclient.popupWindow;

import android.app.Activity;
import android.app.Dialog;
import android.os.Bundle;
import android.view.Display;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
import android.widget.Button;

import conchmusic.conchmusicclient.R;

public class PlayPopup extends Dialog {
    Activity context;
    private View.OnClickListener mmClickListener;

    private Button btn_playsure;
    private Button btn_playcancel;

    public PlayPopup(Activity context, int theme, View.OnClickListener clickListener){
        super(context,theme);
        this.context=context;
        this.mmClickListener=clickListener;

    }




    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.play_popup);
        Window dialogWindow=this.getWindow();
        WindowManager manager=context.getWindowManager();
        Display display=manager.getDefaultDisplay();
        WindowManager.LayoutParams params=dialogWindow.getAttributes();
        params.width=(int)(display.getWidth()*0.7);
        params.height=(int)(display.getHeight()*0.3);
        dialogWindow.setAttributes(params);
        btn_playsure=(Button)findViewById(R.id.id_playsure);
        btn_playsure.setOnClickListener(mmClickListener);
        btn_playcancel=(Button)findViewById(R.id.id_playcancel);
        btn_playcancel.setOnClickListener(mmClickListener);
        this.setCancelable(true);


    }


}
